package com.examination.framework.model.response;

/**
 * @author 寇淇芮
 */

public enum CommonCode implements ResultCode{
    INVALIDPARAM(false,10003,"非法参数!"),
    SUCCESS(true,10000,"操作成功!"),
    FAIL(false,11111,"操作失败"),
    SERVER_ERROR(false,99999,"抱歉，系统繁忙，请稍后重试！"),
    DATE_CONVERSION_FAILURE(false,10004,"日期转换失败"),
    DATA_IS_EMPTY(false,10005,"数据为NULL值");
    boolean success;
    int code;

    String message;

    private CommonCode(boolean success,int code,String message){
        this.code = code;
        this.message = message;
        this.success = success;
    }
    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }

}
